package com.common.jump;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.curry.android.util.IntentHelper;
import com.orangelife.mobile.property.activity.PropertyBillDetailMonthActivity;
import com.orangelife.mobile.property.activity.PropertyBillHouseListActivity;

import java.util.HashMap;

/**
 * 物业缴费的跳转类
 * <p>
 * Created by wgf on 2016/7/22.
 *
 * @since v4.0.1
 */
public class PropertyJumper {

    public static void jumpToPropertyFeeList(Context context) {
        IntentHelper.getInstances().intentWithExtra(context, PropertyBillHouseListActivity.class, "listType", PropertyBillHouseListActivity.PROPERTY_LIST_TYPE_HOUSE, Intent.FLAG_ACTIVITY_NEW_TASK);
    }

    public static void jumpToPropertyHistoryList(Context context) {
        IntentHelper.getInstances().intentWithExtraString(context, PropertyBillHouseListActivity.class, "listType", PropertyBillHouseListActivity.PROPERTY_LIST_TYPE_HISTORY);
    }

    public static void jumpToMonthDetail(Activity activity, HashMap<String, Object> map, boolean canOperate, int position) {
        Intent intent = new Intent();
        Bundle bundle = new Bundle();
        bundle.putSerializable("map", map);
        bundle.putBoolean("canOperate", canOperate);
        bundle.putInt("position", position);
        intent.putExtras(bundle);
        intent.setClass(activity, PropertyBillDetailMonthActivity.class);
        activity.startActivityForResult(intent, 1);
        IntentHelper.getInstances().jumpActivityAnimation(activity, false);
    }


}
